package zpe.genericcrud.jsf.view.bean;

import java.util.Locale;
import java.util.ResourceBundle;

import javax.faces.context.FacesContext;

public abstract class FacesMessageUtil {

	public static String get(final String key) {
		FacesContext facesContext = FacesContext.getCurrentInstance();
		Locale locale = facesContext.getApplication().getDefaultLocale();
		ResourceBundle bundle = ResourceBundle.getBundle(facesContext
				.getApplication().getMessageBundle(), locale);

		return bundle.getString(key);
	}

}
